<form method="post" action="<?php _actionUrl($this)?>" onsubmit="return ajax_form(this)">
<input type="hidden" name="ID" value="<?php $this->e('ID')?>"/>
<div class="x-list-title"> 
<table height="100%" width="100%" border="0" cellpadding="0">
<tr><td>
<h2>Danh bạ cá nhân mới</h2>
</td></tr></table>
</div>
<div class="x-form-container">
<div class="form-message"><?php $this->e('message');?></div>
<table width="100%" border="0" cellpadding="0" class="x-form">
<tr>
	<td class="x-form-label" style="width:100px">
		Họ tên: 
	</td>
	<td class="x-form-input">
		<input type="text" name="title" style="width:400px" class="x-text" value=""/>
	</td>
</tr>
<tr>
	<td class="x-form-label">
		Chức vụ: 
	</td>
	<td class="x-form-input">
		<input type="text" name="job_title" style="width:300px" class="x-text" value=""/>
	</td>
</tr>
<tr>
	<td class="x-form-label">
		Công ty: 
	</td>
	<td class="x-form-input">
		<select id="option-contact-company" name="company_id" class="x-select" style="min-width:200px">
		<option></option>	
		<?php foreach( $this->get('companies') as $a ):?>
		<option value="<?php _e($a['ID'])?>"><?php _e($a['title'])?></option>
		<?php endforeach;?>
		</select><a onclick="load_inframe('<?php _baseUrl()?>/Contact/Index/Addcompany?_iframe=yes',{title:'Tạo nhanh công ty'})" class="quick-add" title="Tạo nhanh..."></a>
	</td>
</tr>
<tr>
	<td class="x-form-label">
		Phòng ban: 
	</td>
	<td class="x-form-input">
		<input type="text" name="department" style="width:300px" class="x-text" value=""/>
	</td>
</tr>
<tr>
	<td class="x-form-label">
		Địa chỉ: 
	</td>
	<td class="x-form-input">
		<input type="text" name="address" style="width:300px" class="x-text" value=""/>
	</td>
</tr>
<tr>
	<td class="x-form-label">
		Địa chỉ khác: 
	</td>
	<td class="x-form-input">
		<input type="text" name="address2" style="width:300px" class="x-text" value=""/>
	</td>
</tr>
<tr>
	<td class="x-form-label">
		Email: 
	</td>
	<td class="x-form-input">
		<input type="text" name="email" style="width:300px" class="x-text" value=""/>
	</td>
</tr>
<tr>
	<td class="x-form-label">
		Điện thoại: 
	</td>
	<td class="x-form-input">
		<input type="text" name="phone" style="width:100px" class="x-text" value=""/>
	</td>
</tr>
<tr>
	<td class="x-form-label">
		Di động: 
	</td>
	<td class="x-form-input">
		<input type="text" name="mobile" style="width:100px" class="x-text" value=""/>
	</td>
</tr>
<tr>
	<td class="x-form-label">
		Fax: 
	</td>
	<td class="x-form-input">
		<input type="text" name="fax" style="width:100px" class="x-text" value=""/>
	</td>
</tr>
<tr>
	<td class="x-form-label">
		Trang web: 
	</td>
	<td class="x-form-input">
		<input type="text" name="homepage" style="width:300px" class="x-text" value=""/>
	</td>
</tr>
<tr>
	<td class="x-form-label">
		Ghi chú: 
	</td>
	<td class="x-form-input">
		<textarea name="desc" style="width:400px;height:100px" class="x-text"></textarea>
	</td>
</tr>
<!--
<tr>
	<td class="x-form-label" align="center" valign="top">
		<span class="x-attachment"></span>
	</td>
	
	<td class="x-form-input" valign="top">
		<div id="contact_img"></div>
		<div class="x-file" filename="img" filetypes="*.gif;*.jpg;*.png;*.jpeg" url="<?php _baseUrl();?>/Contact/Index/Uploadperson?ID=<?php $this->e('ID')?>">Ảnh đại diện</div>
	</td>
</tr>-->
<!-- TUY CHON-->
<tr>
	<td colspan="2">
		Tùy chọn 
	</td>
</tr>
<tr>	
	<td class="x-form-label">
		Chọn nhãn:
	</td>
	<td class="x-form-input">
		<?php foreach( $this->get('labels') as $t ):?>
		<span style="padding:4px">
			<input type="checkbox" name="labels[]" style="vertical-align:baseline" value="<?php _e($t['ID'])?>"> <?php _e($t['label'])?>
		</span>	
		<?php endforeach;?>	
	</td>
</tr>
<tr>	
	<td class="x-form-label">
		Cho xem:
	</td>
	<td class="x-form-input">
		<div class="x-select-users" x-name="users[]" x-title="Cho xem liên hệ này"></div>
	</td>
</tr>

<tr>
	<td></td>
	<td>
		<?php _e(tpl_button_add('Cập nhật'));?>
		<a class="x-button x-fresh" href="#Contact">Hủy bỏ</a>		
	</td>
</tr>
</table></div>
</form>